package the.broccoli.setting.configuration;

import org.wisteria.framework.web.ExceptionMessage;
import the.broccoli.setting.service.ILanguageService;

public class LanguageExceptionMessage implements ExceptionMessage {

    private ILanguageService languageService;

    public LanguageExceptionMessage(ILanguageService languageService) {
        this.languageService = languageService;
    }

    @Override
    public String convertCode2Msg(String errorCode) {
        return languageService.getMessage(errorCode);
    }
}
